// based css:
// https://github.com/shimmerproject/Greybird/blob/master/gtk-3.0/_xfce.scss

/**************
 * Xfce4 Apps *
 **************/
.XfceHeading {
  background-color: $base;
}


/***************
 * xfce4-panel *
 ***************/
.xfce4-panel.background {
  border: none; // Sadly the border is hard-coded
  background-color: $panel;
  color: $panel-text-secondary;
  font-weight: 500;

  button {
    min-height: 16px;
    min-width: 16px;
    padding: 0;
    border-radius: 0;
    @extend %button-flat;
    color: $panel-text-secondary;

    &:hover, &:active, &:checked { color: $panel-text; }

    &:disabled { color: $panel-text-secondary-disabled; }
  }

  .tasklist button {
    // border-image: image(transparent) 0 0 2 / 0 0 2px;

    // &:checked { border-image: image(currentColor) 0 0 2 / 0 0 2px; }

    image { padding: $space-size; }
  }
}

// Workspace switcher provided by libwnck
wnck-pager {
  &:hover { background-color: $overlay-hover; }

  &:active { background-color: $overlay-active; }

  &:selected { background-color: $primary; }
}

XfdesktopIconView.view {
  border-radius: $corner-radius;
  background-color: transparent;
  color: on(dark);

  // XfdesktopIconView uses :active instead of :selected for selection
  &:active {
    @extend %selected_items_color;

    box-shadow: none;
  }

  .rubberband {
    @extend rubberband;

    border-radius: 0;
  }
}

window#whiskermenu-window {
  border-radius: 0;
  background-color: $background;
  border: none;

  entry.search:focus { background-color: $base; }

  // Need to set Whisker menu background opacity less than 100
  > frame > border {
    border-radius: $window-radius;
    padding: $space-size $space-size + 2px $space-size $space-size * 1.5;
    margin: $space-size;
    border: none;
    background-color: $popover;
    box-shadow: $shadow-z4, inset 0 1px highlight($popover);
  }

  box.categories > button.radio { // sidebar categories button
    padding: $space-size / 2 $space-size;
    margin: 1px 0;

    &:hover { background-color: $divider; }

    &:checked, &:active {
      background-color: $track;
      color: $text;

      &:hover { background-image: none; }
    }
  }

  scrolledwindow.frame { // App list (tree)
    padding: $space-size / 2;
    background-color: $base;
    border-radius: $corner-radius;

    treeview.view {
      border-radius: $corner-radius;

      &:not(:hover):not(:selected) { background: none; }

      &:selected:hover {
        background-color: $divider;
        color: $text;
      }
    }
  }

  .title-area > .commands-area > button.flat.command-button { // Bottom command buttons
    &:checked, &:active {
      background-color: $track;
      color: $text;
    }
  }
}

#XfceNotifyWindow {
  box-shadow: none;
  border: none;
  border-radius: $window-radius;

  buttonbox { padding: 0; }

  label#summary { font-weight: bold; }
}

// Xfwm4's alt-tab dialog, aka "tabwin"
#xfwm-tabwin {
  padding: 12px;
  border-radius: $corner-radius;

  // Set the application icon- and preview-size to 64px
  -XfwmTabwinWidget-icon-size: 64px;
  -XfwmTabwinWidget-preview-size: 64px;
}


/**********
 * Thunar *
 **********/
.thunar {
  toolbar {
    box-shadow: inset 0 -1px $border;
    padding: $space-size;
  }

  .standard-view.frame,
  .sidebar.frame { border: none; }

  .sidebar .view:not(:selected) { background-color: transparent; }

  .path-bar.linked:not(.vertical) > button.path-bar-button {
    margin-left: 2px;
    margin-right: 2px;
    @extend %button-basic;
  }

  statusbar {
    margin: 0 -10px;
    padding: 0 4px;
    border-top: 1px solid $divider;
  }

  > grid.horizontal > paned.horizontal > scrolledwindow.frame.sidebar.shortcuts-pane {
    border-top: none;
  }
}

window.background.csd.thunar {
  > grid.horizontal > paned.horizontal > scrolledwindow.frame.sidebar.shortcuts-pane {
    border-bottom-left-radius: $window-radius;

    // treeview.view:not(:hover):not(:selected) {
    //   background-color: transparent;
    // }
  }
}

// vala-panel-appmenu
menubar.-vala-panel-appmenu-private, // xfce4 appmenu plugin
menubar.-vala-panel-background {
  background: none;
  border: none;
  box-shadow: none;
  animation: none;

  > menuitem {
    color: $panel-text-secondary;
    font-weight: normal;

    &:hover {
      color: $panel-text;
      border-radius: 0;
    }

    &:disabled {
      color: $panel-text-secondary-disabled;
    }

    > window.popup {
      margin: $space-size;
    }
  }
}

dialog.xfsm-logout-dialog {
  box-shadow: none;
  border: none;
  background-color: $base;
}
